#include "base.h"

/* c方式实现的方式 */
int setup_serial(int fd, int nSpeed, int nBits, char nEvent, int nStop);
int open_port(char* com);
int serial_recv(int fd, uint8_t* rev_buf, int data_len);
int analysis_data(ssize_t bytes_read, uint8_t* rev_buf, NMEA* nmea);

unsigned int hexdigit(char c);
char hexStringToAscii(const char* hex);
char hexToAscii(unsigned char hex);
int hexToAscii(unsigned char hex);

int charToDigit(char c);

void asciiToHex(char ascii, char* hex);

